﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace KZ400B.Link
{
    public abstract class LinkBase
    {
        protected bool m_IsOpen;

        public virtual bool IsOpen
        {
            get { return m_IsOpen; }
            set { m_IsOpen = value; }
        }
         protected bool m_CanRead;

         public virtual bool CanRead
        {
            get { return m_CanRead; }
            set { m_CanRead = value; }
        }
        protected bool m_CanWrite;

        public virtual bool CanWrite
        {
            get { return m_CanWrite; }
            set { m_CanWrite = value; }
        }
        public abstract bool Open(string name);
        public abstract bool Open(string ip, int port);
        public abstract int Write(string data);
        public abstract string ReadString();
    }
}
